package com.jian.android.autojipai.app.helper;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import androidx.appcompat.app.AlertDialog;
import androidx.core.view.ViewCompat;
import com.jian.android.autojipai.data.bean.ConfigureFromGitee;

/* loaded from: classes.dex */
public class DialogTool {

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes.dex */
    public static class DialogToolInstance {
        private static final DialogTool instance = new DialogTool();

        private DialogToolInstance() {
        }
    }

    private DialogTool() {
    }

    public static DialogTool getInstance() {
        return DialogToolInstance.instance;
    }

    public void showMyWxDialog(Activity activity, ConfigureFromGitee configureFromGitee) {

    }

    public void showWxGroupDialog(Activity activity, ConfigureFromGitee configureFromGitee) {

    }

    public void showWxGzhDialog(Activity activity, ConfigureFromGitee configureFromGitee) {

    }

    public void showNewAppDialog(final Activity activity, final ConfigureFromGitee configureFromGitee) {

    }

    public void showUseKnowDialog(Activity activity) {

    }

    public void showTipDialog(final Activity activity, String str) {
        AlertDialog show = new AlertDialog.Builder(activity).setMessage((CharSequence) str).setPositiveButton((CharSequence) "退出", new DialogInterface.OnClickListener() { // from class: com.sdjpq.tool.DialogTool.8
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                if (dialogInterface != null) {
                    dialogInterface.dismiss();
                }
                activity.finish();
            }
        }).setCancelable(false).show();
        show.setCanceledOnTouchOutside(false);
        show.getButton(-1).setTextColor(ViewCompat.MEASURED_STATE_MASK);
    }

    public void showNotificationDialog(final Context context) {
        AlertDialog show = new AlertDialog.Builder(context).setTitle((CharSequence) "提示").setMessage((CharSequence) "请同意通知权限").setPositiveButton((CharSequence) "确认", new DialogInterface.OnClickListener() { // from class: com.sdjpq.tool.DialogTool.10
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                Intent data;
                if (dialogInterface != null) {
                    dialogInterface.dismiss();
                }
                if (Build.VERSION.SDK_INT >= 26) {
                    data = new Intent("android.settings.APP_NOTIFICATION_SETTINGS").putExtra("android.provider.extra.APP_PACKAGE", context.getPackageName());
                } else {
                    data = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS").setData(Uri.parse("package:" + context.getPackageName()));
                }
                context.startActivity(data);
            }
        }).setNegativeButton((CharSequence) "取消", new DialogInterface.OnClickListener() { // from class: com.sdjpq.tool.DialogTool.9
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                if (dialogInterface != null) {
                    dialogInterface.dismiss();
                }
            }
        }).setCancelable(true).show();
        show.setCanceledOnTouchOutside(true);
        show.getButton(-1).setTextColor(ViewCompat.MEASURED_STATE_MASK);
        show.getButton(-2).setTextColor(ViewCompat.MEASURED_STATE_MASK);
    }
}
